package ShapeModel;

import java.awt.*;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

public class CADRectangle extends Rectangle2D.Double implements CADShape {
    private int zVal;
    private Color c;
    private float strokeWidth;


    public CADRectangle(double x, double y, double w, double h, int zVal, Color c, float strokeWidth) {
        super(x, y, w, h);
        this.zVal = zVal;
        this.c = c;
        this.strokeWidth = strokeWidth;

    }


    @Override
    public void setZ(int z) {
        this.zVal = z;
    }

    @Override
    public int getZ() {
        return this.zVal;
    }

    @Override
    public void setPos(Point2D p1, Point2D p2) {
        this.setFrameFromDiagonal(p1, p2);
    }


    @Override
    public void setColor(Color c) {
        this.c = c;
    }

    @Override
    public Color getColor() {
        return c;
    }

    @Override
    public void setStrokeWidth(float width) {
        this.strokeWidth = width;
    }

    @Override
    public float getStrokeWidth() {
        return strokeWidth;
    }


}
